<?php
namespace Library;

use Library\Mvc\Controller;
use Library\Mvc\Router;

class Error
{
	private $_config;
	private $_bootstrap;
	
	public function __construct($config, \Library\Mvc\Bootstrap $bootstrap)
	{
		$this->_config = $config;
		$this->_bootstrap = $bootstrap;
	}
	
	public function displayException(\Exception $exception)
	{
		if ($this->_bootstrap->callEvent('applicationError', array($exception)) === false)
		{
			return;
		}
		
		ob_end_clean();
		
		$request = new \Library\Mvc\Request('Error/error');
		$boostrap = new \Library\Mvc\Bootstrap($this->_config, $request);
	}
}